import React, { Component } from 'react';
import { View, Image, StyleSheet } from 'react-native';
import { TextField} from 'iftide'


export default class Basic1 extends Component{
    constructor(props) {
        super(props);
    }

    _rightPress1(){
        alert("1");
    }

    _rightPress2(){
        alert("2");
    }

    render() {
        const img = require('../images/Icon.png');
        const imgOne = [require('../images/Icon.png')];
        const imgtmp = [require('../images/Icon.png'), require('../images/Icon.png')];

        return (
            <View>
                <View style={styles.item}>
                    <TextField hasTopBorder={true} isMerge={true} title="学校名称" placeholder="请输入中英文学校名称（清除）" defaultValue={'university'} showClearIcon={true} rightImg={imgOne}/>
                </View>
                <View style={styles.item}>
                    <TextField isMerge={true} title="学校名称" placeholder="请输入中英文学校名称" showClearIcon={false} rightImg={imgtmp} rightFunc={()=>{this._rightPress1()}} rightFunc2={()=>{this._rightPress2()}}/>
                </View>
                <View style={styles.item}>
                    <TextField isMerge={false} placeholder="请输入中英文学校名称" showClearIcon={false} leftIcon={img} rightImg={imgtmp}/>
                </View>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    item : {
        flexDirection: 'row',
    }
});